import React, { Component } from 'react'

export default class Add extends Component {
    constructor(props) {
        super(props)
    
        this.state = {
            title: ""
        }
    }
    
    render() {
        return (
            <div>
                 <input type="text" value={this.state.title} onChange={this.props.chenge} /><button onClick={()=>{
                     this.props.add(this.state.title)
                 }}>添加</button>
            </div>
        )
    }
}
